package com.coderside.fragment.arithmetic;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.RandomAccessFile;
import java.nio.ByteBuffer;
import java.nio.channels.FileChannel;

public class ConcurrencySort {

	public static void main(String[] args) {
		try {
			File bitFile = new File("E:\\A.txt");
			FileChannel fcin = new RandomAccessFile(bitFile, "rw").getChannel();
			ByteBuffer rBuffer = ByteBuffer.allocate(1000 + 20);
			byte[] dst = new byte[1000];
			rBuffer.putInt(1);
			int aa = rBuffer.getInt(3);
			fcin.write(ByteBuffer.wrap(dst));
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		} catch (IOException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
	}
}
